package com.SMP.dao;

import com.SMP.model.News;
import com.SMP.model.NewsExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface NewsMapper {
    long countByExample(NewsExample example);

    int deleteByExample(NewsExample example);

    int deleteByPrimaryKey(String id);

    int insert(News record);

    int insertSelective(News record);

    List<News> selectByExample(NewsExample example);

    News selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") News record, @Param("example") NewsExample example);

    int updateByExample(@Param("record") News record, @Param("example") NewsExample example);

    int updateByPrimaryKeySelective(News record);

    int updateByPrimaryKey(News record);

    List<News> TypeSelectByExample();

    List<News> selectByNewsTime();

    //根据标题查询
    List<News> selectByTitle(String title);
    // 根据名字查询
    List<News> selectByReleasePeople(String releasePeople);
    //根据发布状态
    List<News> selectByReleaseState(String releaseState);
    //根据类型
    List<News> selectByNewsType(String newsType);
    //发布和取消发布
    int updateByReleaseState(News news);
    //根据时间
    List<News> selectByReleaseTime(String releaseTime);
    // List<News> StateSelectByExample();
}